﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KendoMvcUI.Core;
using KendoMvcUI.Common;
using System.Web.Mvc;

namespace KendoMvcUI.UI
{
    public class NumericTextBox:KendoUIBase
    {
        public NumericTextBox(KendoUIControlSettings settings,ViewContext context,IViewDataContainer viewDataContainer)
            :base(settings,context,viewDataContainer)
        { }
        public override string RenderHtml()
        {
            return "<input id=\"{0}\"/>".Formator(Settings.Id);
        }
    }
    public class NumericTextBoxSettings : KendoUIControlSettings
    {
        public NumericTextBoxSettings()
            : base("kendoNumericTextBox")
        { }
        public string Culture { get; set; }
        /// <summary>
        /// default:null
        /// </summary>
        public int? Decimals { get; set; }
        /// <summary>
        /// Specifies the text of the tooltip on the down arrow.
        /// default:"Decrease value"
        /// </summary>
        public string DownArrowText { get; set; }
        /// <summary>
        /// default:"n"
        /// </summary>
        public string Format { get; set; }
        public int? Max { get; set; }
        public int? Min { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Placeholder { get; set; }
        /// <summary>
        /// Specifies whether the up and down spin buttons should be rendered
        /// </summary>
        public bool? Spinners { get; set; }
        public double? Step { get; set; }
        public string UpArrowText { get; set; }
        public int? Value { get; set; }

        #region 事件
        public string On_Change { get; set; }
        public string On_Spin { get; set; }
        #endregion
    }
}
